<?php
class WooBaseApplicationRegistry{
	private static $instance;
	private $request;
	public $data = array();

	private function __construct(){
		
	}


    //静态的单例模式
	static function instance(){
		if(! isset(self::$instance)){
			self::$instance = new self();
		}
		return self::$instance;
	}

	//获取对象
	static function getDSN($key){
		return $data[$key];
	}

	//存放对象
	static function setDSN($key,$value){
		$data[$key] = $value;
	}


	//获取对象
	static function getRequest(){
		///var_dump('WooBaseApplicationRegistry getRequest '.$request);
		return $request;
	}

	//存放对象
	static function setRequest($request){
		//var_dump('WooBaseApplicationRegistry setRequest '.$request);
		$request = $request;
	}
}